*************************************************************************************
*****			Please cite Georgiadou et al. (2018) as indicated in 			*****
*****  	https://www.sciencedirect.com/science/article/pii/S026137941830026X		*****
*************************************************************************************




use Data/GRR_data.dta, clear

****** Pseudo R2 for our estimations
****** Table 2 
*generate differences to obtain fitted values
carryforward D_par, gen(D_par_carry)
carryforward PRR, gen(PRR_carry)
carryforward ER, gen(ER_carry)
carryforward PRR2, gen(PRR_carry2)
carryforward ER2, gen(ER_carry2)

sort nuts_2 year
gen DPRR=PRR-L.PRR_carry
gen DLunemp= D.Lunemp
gen DLdiff_immigration= D.Ldiff_immigration
gen DLgdp_pps_hab= D.Lgdp_pps_hab
gen DLtax= D.Ltax
gen DLgini= D.Lgini
gen DLwage_sh= D.Lwage_sh
gen DLD_gdp_growth= D.LD_gdp_growth
gen DD_par= D.D_par_carry
gen DLimmigration_cr= D.Limmigration_cr
gen DLunemp_diffimmigration= D.Lunemp_diffimmigration
gen DLunemp_immigr_cr= D.Lunemp_immigr_cr
gen DLgini_disp_inc= D.Lgini_disp_inc
gen DLgini_disp_east= D.Lgini_disp_east
gen DLgrowth = D.Lgrowth
*gen interactions and differences in interactions for calculations of fitted values
gen Lunemp_east=Lunemp*D_east
gen Limmigr_east=Ldiff_immigration*D_east
gen Lunemp_diffimm_east=Lunemp_diffimmigration*D_east
gen Lgdp_east=Lgdp_pps_hab*D_east
gen Ltax_east=Ltax*D_east
gen Lgini_east=Lgini*D_east
gen Lwage_sh_east=Lwage_sh*D_east
gen Lgrowth_east=LD_gdp_growth*D_east
gen Ldiffimm_east=Ldiff_immigration*D_east
gen Lineq_east=Lgini_disp_inc*D_east

gen Dpar_east=D_par*D_east
gen DLunemp_east=D.Lunemp_east 
gen DLimmigr_east = D.Limmigr_east
gen DLunemp_diffimm_east = D.Lunemp_diffimm_east
gen DLgdp_east = D.Lgdp_east
gen DLtax_east = D.Ltax_east
gen DLgini_east = D.Lgini_east
gen DLwage_sh_east = D.Lwage_sh_east
gen DLgrowth_east = D.Lgrowth_east
gen DLdiffimm_east = D.Ldiffimm_east
gen DLineq_east = D.Lineq_east
gen DDpar_east = D.Lineq_east

carryforward Lgini_disp_inc, gen(Lgini_disp_carry)
gen Lgini_east_carry= D_east*Lgini_disp_carry
gen DLgini_disp_carry= D.Lgini_disp_carry
gen DLgini_east_carry= D.Lgini_east_carry
gen Leduc_tert=L.educ_pop_tert
gen Leduc_lsec=L.educ_pop_lsec
gen DLeduc_tert = D.Leduc_tert
gen DLeduc_lsec = D.Leduc_lsec
gen DLunemp_gdp = D.Lunemp_gdp

*** Create variables indicating GDP quartile for region
gen Lgdp_quart1= 0
replace Lgdp_quart1=1 if Lgdp_pps_hab<=16
gen Lgdp_quart2= 0
replace Lgdp_quart2=1 if Lgdp_pps_hab>16 & Lgdp_pps_hab<=21.2 
gen Lgdp_quart3= 0
replace Lgdp_quart3=1 if Lgdp_pps_hab>21.2 & Lgdp_pps_hab<=26.3 
gen Lgdp_quart4= 0
replace Lgdp_quart4=1 if Lgdp_pps_hab>26.3
*** Replace missing values (STATA sees . as infinite)
replace Lgdp_quart1=. if Lgdp_pps_hab==.
replace Lgdp_quart2=. if Lgdp_pps_hab==.
replace Lgdp_quart3=. if Lgdp_pps_hab==.
replace Lgdp_quart4=. if Lgdp_pps_hab==.
gen DLgdp_quart1=D.Lgdp_quart1
gen DLgdp_quart2=D.Lgdp_quart2
gen DLgdp_quart3=D.Lgdp_quart3
gen DLgdp_quart4=D.Lgdp_quart4

************************
****** Table 2 *******
************************
*** T2 Column (1)
pantob PRR Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_t1c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen PRR_hat_t1c1 = L.PRR_carry + DPRR_hat_t1c1
corr PRR_hat_t1c1 PRR if PRR!=0
mat corrmat_t1c1 = r(C)
scalar corrsca_t1c1= corrmat_t1c1[1,2]
scalar pseudoR2_t1c1= corrsca_t1c1^2
display as text "Pseudo R2=" as result pseudoR2_t1c1
*** T2 Column (2)
pantob ER Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DER_hat_t1c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen ER_hat_t1c2 = L.ER_carry + DER_hat_t1c2
corr ER_hat_t1c2 ER if ER!=0
mat corrmat_t1c2 = r(C)
scalar corrsca_t1c2= corrmat_t1c2[1,2]
scalar pseudoR2_t1c2= corrsca_t1c2^2
display as text "Pseudo R2=" as result pseudoR2_t1c2
*** T2 Column (3)
pantob PRR Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_t1c3= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_t1c3 = L.PRR_carry + DPRR_hat_t1c3
corr PRR_hat_t1c3 PRR if PRR!=0
mat corrmat_t1c3 = r(C)
scalar corrsca_t1c3= corrmat_t1c3[1,2]
scalar pseudoR2_t1c3= corrsca_t1c3^2
display as text "Pseudo R2=" as result pseudoR2_t1c3
*** T2 Column (4)
pantob ER Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DER_hat_t1c4= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_t1c4 = L.ER_carry + DER_hat_t1c4
corr ER_hat_t1c4 ER if ER!=0
mat corrmat_t1c4 = r(C)
scalar corrsca_t1c4= corrmat_t1c4[1,2]
scalar pseudoR2_t1c4= corrsca_t1c4^2
display as text "Pseudo R2=" as result pseudoR2_t1c4
*** T2 Column (5)
pantob PRR Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_t1c5= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_t1c5 = L.PRR_carry + DPRR_hat_t1c5
corr PRR_hat_t1c5 PRR if PRR!=0
mat corrmat_t1c5 = r(C)
scalar corrsca_t1c5= corrmat_t1c5[1,2]
scalar pseudoR2_t1c5= corrsca_t1c5^2
display as text "Pseudo R2=" as result pseudoR2_t1c5
*** T2 Column (6)
pantob PRR Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_t2c6= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_t2c6 = L.PRR_carry + DPRR_hat_t2c6
corr PRR_hat_t2c6 PRR if PRR!=0
mat corrmat_t2c6= r(C)
scalar corrsca_t2c6= corrmat_t2c6[1,2]
scalar pseudoR2_t2c6= corrsca_t2c6^2
display as text "Pseudo R2=" as result pseudoR2_t2c6
*** T2 Column (7)
pantob ER Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DER_hat_t1c7= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_t1c7 = L.ER_carry + DER_hat_t1c7
corr ER_hat_t1c7 ER if ER!=0
mat corrmat_t1c2 = r(C)
scalar corrsca_t1c2= corrmat_t1c2[1,2]
scalar pseudoR2_t1c2= corrsca_t1c2^2
display as text "Pseudo R2=" as result pseudoR2_t1c2



************************
****** Table A3 *******
************************
*** TA3 Column (1)
pantob PRR Lgini_disp_inc Lunemp Ldiff_immigration D_par nuts_2 
gen DPRR_hat_t2c1= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_t2c1 = L.PRR_carry + DPRR_hat_t2c1
corr PRR_hat_t2c1 PRR if PRR!=0
mat corrmat_t2c1 = r(C)
scalar corrsca_t2c1= corrmat_t2c1[1,2]
scalar pseudoR2_t2c1= corrsca_t2c1^2
display as text "Pseudo R2=" as result pseudoR2_t2c1
*** TA3 Column (2)
pantob ER Lgini_disp_inc Lunemp Ldiff_immigration D_par nuts_2 
gen DER_hat_t2c2= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_t2c2 = L.ER_carry + DER_hat_t2c2
corr ER_hat_t2c2 ER if ER!=0
mat corrmat_t2c2 = r(C)
scalar corrsca_t2c2= corrmat_t2c2[1,2]
scalar pseudoR2_t2c2= corrsca_t2c2^2
display as text "Pseudo R2=" as result pseudoR2_t2c2
*** TA3 Column (3)
pantob PRR Lgini_disp_inc Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_t2c3= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_t2c3 = L.PRR_carry + DPRR_hat_t2c3
corr PRR_hat_t2c3 PRR if PRR!=0
mat corrmat_t2c3 = r(C)
scalar corrsca_t2c3= corrmat_t2c3[1,2]
scalar pseudoR2_t2c3= corrsca_t2c3^2
display as text "Pseudo R2=" as result pseudoR2_t2c3
*** TA3 Column (4)
pantob ER Lgini_disp_inc Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DER_hat_t2c4= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_t2c4 = L.ER_carry + DER_hat_t2c4
corr ER_hat_t2c4 ER if ER!=0
mat corrmat_t2c4 = r(C)
scalar corrsca_t2c4= corrmat_t2c4[1,2]
scalar pseudoR2_t2c4= corrsca_t2c4^2
display as text "Pseudo R2=" as result pseudoR2_t2c4



************************
****** Table A4 *******
************************
*** TA4 Column (1)
qui: tobit PRR Lunemp Ldiff_immigration D_par i.nuts_2,ll(0) 
predict PRR_hat_tA4c1, xb
corr PRR_hat_tA4c1 PRR if PRR!=0
mat corrmat_tA4c1 = r(C)
scalar corrsca_tA4c1= corrmat_tA4c1[1,2]
scalar pseudoR2_tA4c1= corrsca_tA4c1^2
display as text "Pseudo R2=" as result pseudoR2_tA4c1
*** TA4 Column (2)
qui: tobit ER Lunemp Ldiff_immigration D_par i.nuts_2,ll(0)
predict ER_hat_tA4c2, xb
corr ER_hat_tA4c2 ER if ER!=0
mat corrmat_tA4c2 = r(C)
scalar corrsca_tA4c2= corrmat_tA4c2[1,2]
scalar pseudoR2_tA4c2= corrsca_tA4c2^2
display as text "Pseudo R2=" as result pseudoR2_tA4c2
*** TA4 Column (3)
qui: tobit PRR Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2,ll(0) 
predict PRR_hat_tA4c3, xb
corr PRR_hat_tA4c3 PRR if PRR!=0
mat corrmat_tA4c3 = r(C)
scalar corrsca_tA4c3= corrmat_tA4c3[1,2]
scalar pseudoR2_tA4c3= corrsca_tA4c3^2
display as text "Pseudo R2=" as result pseudoR2_tA4c3
*** TA4 Column (4)
qui: tobit ER Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2,ll(0) 
predict ER_hat_tA4c2, xb
corr ER_hat_tA4c2 ER if ER!=0
mat corrmat_tA4c2 = r(C)
scalar corrsca_tA4c2= corrmat_tA4c2[1,2]
scalar pseudoR2_tA4c2= corrsca_tA4c2^2
display as text "Pseudo R2=" as result pseudoR2_tA4c2


************************
******  Table A5 *******
************************
*** TA5 Column (1)
set seed 123
qui: tobit PRR Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict PRR_hat_tA5c1, xb
corr PRR_hat_tA5c1 PRR if PRR!=0
mat corrmat_tA5c1 = r(C)
scalar corrsca_tA5c1= corrmat_tA5c1[1,2]
scalar pseudoR2_tA5c1= corrsca_tA5c1^2
display as text "Pseudo R2=" as result pseudoR2_tA5c1
*** TA5 Column (2)
set seed 123
qui: tobit ER Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0)
predict ER_hat_tA5c2, xb
corr ER_hat_tA5c2 ER if ER!=0
mat corrmat_tA5c2 = r(C)
scalar corrsca_tA5c2= corrmat_tA5c2[1,2]
scalar pseudoR2_tA5c2= corrsca_tA5c2^2
display as text "Pseudo R2=" as result pseudoR2_tA5c2
*** TA5 Column (3)
set seed 123
qui: tobit PRR Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict PRR_hat_tA5c3, xb
corr PRR_hat_tA5c3 PRR if PRR!=0
mat corrmat_tA5c3 = r(C)
scalar corrsca_tA5c3= corrmat_tA5c3[1,2]
scalar pseudoR2_tA5c3= corrsca_tA5c3^2
display as text "Pseudo R2=" as result pseudoR2_tA5c3
*** TA5 Column (4)
set seed 123
qui: tobit ER Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict ER_hat_tA5c4, xb
corr ER_hat_tA5c4 ER if ER!=0
mat corrmat_tA5c4 = r(C)
scalar corrsca_tA5c4= corrmat_tA5c4[1,2]
scalar pseudoR2_tA5c4= corrsca_tA5c4^2
display as text "Pseudo R2=" as result pseudoR2_tA5c4
*** TA5 Column (5)
set seed 123
qui: tobit PRR Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict PRR_hat_tA5c5, xb
corr PRR_hat_tA5c5 PRR if PRR!=0
mat corrmat_tA5c5 = r(C)
scalar corrsca_tA5c5= corrmat_tA5c5[1,2]
scalar pseudoR2_tA5c5= corrsca_tA5c5^2
display as text "Pseudo R2=" as result pseudoR2_tA5c5
*** TA5 Column (6)
set seed 123
qui: tobit PRR Lunemp Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict PRR_hat_tA5c6, xb
corr PRR_hat_tA5c6 PRR if PRR!=0
mat corrmat_tA5c6 = r(C)
scalar corrsca_tA5c6= corrmat_tA5c6[1,2]
scalar pseudoR2_tA5c6= corrsca_tA5c6^2
display as text "Pseudo R2=" as result pseudoR2_tA5c6
*** TA5 Column (7)
set seed 123
qui: tobit ER Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict ER_hat_tA5c7, xb
corr ER_hat_tA5c7 ER if ER!=0
mat corrmat_tA5c7 = r(C)
scalar corrsca_tA5c7= corrmat_tA5c7[1,2]
scalar pseudoR2_tA5c7= corrsca_tA5c7^2
display as text "Pseudo R2=" as result pseudoR2_tA5c7
*** TA5 Column (8)
set seed 123
qui: tobit ER Lunemp Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par i.nuts_2, ll(0) 
predict ER_hat_tA5c8, xb
corr ER_hat_tA5c8 ER if ER!=0
mat corrmat_tA5c8 = r(C)
scalar corrsca_tA5c8= corrmat_tA5c8[1,2]
scalar pseudoR2_tA5c8= corrsca_tA5c8^2
display as text "Pseudo R2=" as result pseudoR2_tA5c8


************************
******  Table A6 *******
************************
*** TA6 Column (1)
set seed 123
qui: tobit  PRR Lgini_disp_inc Lunemp Ldiff_immigration D_par i.nuts_2, ll(0) 
predict PRR_hat_tA6c1, xb
corr PRR_hat_tA6c1 PRR if PRR!=0
mat corrmat_tA6c1 = r(C)
scalar corrsca_tA6c1= corrmat_tA6c1[1,2]
scalar pseudoR2_tA6c1= corrsca_tA6c1^2
display as text "Pseudo R2=" as result pseudoR2_tA6c1
*** TA6 Column (2)
set seed 123
qui: tobit ER Lgini_disp_inc Lunemp Ldiff_immigration D_par i.nuts_2, ll(0) 
predict ER_hat_tA6c2, xb
corr ER_hat_tA6c2 ER if ER!=0
mat corrmat_tA6c2 = r(C)
scalar corrsca_tA6c2= corrmat_tA6c2[1,2]
scalar pseudoR2_tA6c2= corrsca_tA6c2^2
display as text "Pseudo R2=" as result pseudoR2_tA6c2
*** TA6 Column (3)
set seed 123
qui: tobit  PRR Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  i.nuts_2, ll(0) 
predict PRR_hat_tA6c3, xb
corr PRR_hat_tA6c3 PRR if PRR!=0
mat corrmat_tA6c3 = r(C)
scalar corrsca_tA6c3= corrmat_tA6c3[1,2]
scalar pseudoR2_tA6c3= corrsca_tA6c3^2
display as text "Pseudo R2=" as result pseudoR2_tA6c3
*** TA6 Column (4)
set seed 123
qui: tobit ER Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  i.nuts_2, ll(0)  
predict ER_hat_tA6c4, xb
corr ER_hat_tA6c4 ER if ER!=0
mat corrmat_tA6c4 = r(C)
scalar corrsca_tA6c4= corrmat_tA6c4[1,2]
scalar pseudoR2_tA6c4= corrsca_tA6c4^2
display as text "Pseudo R2=" as result pseudoR2_tA6c4



************************
******  Table A7 *******
************************
*** TA7 Column (1)
pantob PRR Lunemp Limmigration_cr  D_par nuts_2 
gen DPRR_hat_tA7c1= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr +_b[D_par]*DD_par
gen PRR_hat_tA7c1 = L.PRR_carry + DPRR_hat_tA7c1
corr PRR_hat_tA7c1 PRR if PRR!=0
mat corrmat_tA7c1 = r(C)
scalar corrsca_tA7c1= corrmat_tA7c1[1,2]
scalar pseudoR2_tA7c1= corrsca_tA7c1^2
display as text "Pseudo R2=" as result pseudoR2_tA7c1
*** TA7 Column (2)
pantob ER Lunemp Limmigration_cr D_par nuts_2 
gen DER_hat_tA7c2= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr +_b[D_par]*DD_par
gen ER_hat_tA7c2 = L.ER_carry + DER_hat_tA7c2
corr ER_hat_tA7c2 ER if ER!=0
mat corrmat_tA7c2 = r(C)
scalar corrsca_tA7c2= corrmat_tA7c2[1,2]
scalar pseudoR2_tA7c2= corrsca_tA7c2^2
display as text "Pseudo R2=" as result pseudoR2_tA7c2
*** TA7 Column (3)
pantob PRR Lunemp Limmigration_cr Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_tA7c3= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA7c3 = L.PRR_carry + DPRR_hat_tA7c3
corr PRR_hat_tA7c3 PRR if PRR!=0
mat corrmat_tA7c3 = r(C)
scalar corrsca_tA7c3= corrmat_tA7c3[1,2]
scalar pseudoR2_tA7c3= corrsca_tA7c3^2
display as text "Pseudo R2=" as result pseudoR2_tA7c3
*** TA7 Column (4)
pantob ER Lunemp Limmigration_cr  Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth  D_par nuts_2 
gen DER_hat_tA7c4= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA7c4 = L.ER_carry + DER_hat_tA7c4
corr ER_hat_tA7c4 ER if ER!=0
mat corrmat_tA7c4 = r(C)
scalar corrsca_tA7c4= corrmat_tA7c4[1,2]
scalar pseudoR2_tA7c4= corrsca_tA7c4^2
display as text "Pseudo R2=" as result pseudoR2_tA7c4


************************
******  Table A8 *******
************************
*** TA8 Column (1)
pantob PRR Lgini_disp_inc Lunemp Limmigration_cr  D_par nuts_2 
gen DPRR_hat_tA8c1= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[D_par]*DD_par
gen PRR_hat_tA8c1 = L.PRR_carry + DPRR_hat_tA8c1
corr PRR_hat_tA8c1 PRR if PRR!=0
mat corrmat_tA8c1 = r(C)
scalar corrsca_tA8c1= corrmat_tA8c1[1,2]
scalar pseudoR2_tA8c1= corrsca_tA8c1^2
display as text "Pseudo R2=" as result pseudoR2_tA8c1
*** TA8 Column (2)
pantob ER Lgini_disp_inc Lunemp Limmigration_cr  D_par nuts_2 
gen DER_hat_tA8c2= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[D_par]*DD_par
gen ER_hat_tA8c2 = L.ER_carry + DER_hat_tA8c2
corr ER_hat_tA8c2 ER if ER!=0
mat corrmat_tA8c2 = r(C)
scalar corrsca_tA8c2= corrmat_tA8c2[1,2]
scalar pseudoR2_tA8c2= corrsca_tA8c2^2
display as text "Pseudo R2=" as result pseudoR2_tA8c2
*** TA8 Column (3)
pantob PRR Lgini_disp_inc Lunemp Limmigration_cr  Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth  D_par nuts_2 
gen DPRR_hat_tA8c3= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA8c3 = L.PRR_carry + DPRR_hat_tA8c3
corr PRR_hat_tA8c3 PRR if PRR!=0
mat corrmat_tA8c3 = r(C)
scalar corrsca_tA8c3= corrmat_tA8c3[1,2]
scalar pseudoR2_tA8c3= corrsca_tA8c3^2
display as text "Pseudo R2=" as result pseudoR2_tA8c3
*** TA8 Column (4)
pantob ER Lgini_disp_inc Lunemp Limmigration_cr  Lgdp_pps_hab Ltax Lgini Lwage_sh LD_gdp_growth  D_par nuts_2 
gen DER_hat_tA8c4= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA8c4 = L.ER_carry + DER_hat_tA8c4
corr ER_hat_tA8c4 ER if ER!=0
mat corrmat_tA8c4 = r(C)
scalar corrsca_tA8c4= corrmat_tA8c4[1,2]
scalar pseudoR2_tA8c4= corrsca_tA8c4^2
display as text "Pseudo R2=" as result pseudoR2_tA8c4


************************
******  Table A9 *******
************************
*** TA9 Column (1)
pantob PRR2 Lunemp Ldiff_immigration   D_par  nuts_2 
gen DPRR_hat_tA9c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_tA9c1 = L.PRR_carry2 + DPRR_hat_tA9c1
corr PRR_hat_tA9c1 PRR2 if PRR2!=0
mat corrmat_tA9c1 = r(C)
scalar corrsca_tA9c1= corrmat_tA9c1[1,2]
scalar pseudoR2_tA9c1= corrsca_tA9c1^2
display as text "Pseudo R2=" as result pseudoR2_tA9c1
*** TA9 Column(2)
pantob ER2 Lunemp Ldiff_immigration D_par  nuts_2 
gen DER_hat_tA9c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_tA9c2 = L.ER_carry2 + DER_hat_tA9c2
corr ER_hat_tA9c2 ER2 if ER2!=0
mat corrmat_tA9c2 = r(C)
scalar corrsca_tA9c2= corrmat_tA9c2[1,2]
scalar pseudoR2_tA9c2= corrsca_tA9c2^2
display as text "Pseudo R2=" as result pseudoR2_tA9c2
*** TA9 Column(3)
pantob PRR2 Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA9c3= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA9c3 = L.PRR_carry2 + DPRR_hat_tA9c3
corr PRR_hat_tA9c3 PRR2 if PRR2!=0
mat corrmat_tA9c3 = r(C)
scalar corrsca_tA9c3= corrmat_tA9c3[1,2]
scalar pseudoR2_tA9c3= corrsca_tA9c3^2
display as text "Pseudo R2=" as result pseudoR2_tA9c3
*** TA9 Column(4)
pantob ER2 Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA9c4= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA9c4 = L.ER_carry2 + DER_hat_tA9c4
corr ER_hat_tA9c4 ER2 if ER2!=0
mat corrmat_tA9c4 = r(C)
scalar corrsca_tA9c4= corrmat_tA9c4[1,2]
scalar pseudoR2_tA9c4= corrsca_tA9c4^2
display as text "Pseudo R2=" as result pseudoR2_tA9c4



************************
****** Table A10 *******
************************
*** TA10 Column(1)
pantob PRR2 Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA10c1= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA10c1 = L.PRR_carry2 + DPRR_hat_tA10c1
corr PRR_hat_tA10c1 PRR2 if PRR2!=0
mat corrmat_tA10C1 = r(C)
scalar corrsca_tA10C1= corrmat_tA10C1[1,2]
scalar pseudoR2_tA10C1= corrsca_tA10C1^2
display as text "Pseudo R2=" as result pseudoR2_tA10C1
*** TA10 Column(2)
pantob ER2 Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA10c2= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA10c2 = L.ER_carry2 + DER_hat_tA10c2
corr ER_hat_tA10c2 ER2 if ER2!=0
mat corrmat_tA10c2 = r(C)
scalar corrsca_tA10c2= corrmat_tA10c2[1,2]
scalar pseudoR2_tA10c2= corrsca_tA10c2^2
display as text "Pseudo R2=" as result pseudoR2_tA10c2
*** TA10 Column(3)
pantob PRR2 Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA10c3= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA10c3 = L.PRR_carry2 + DPRR_hat_tA10c3
corr PRR_hat_tA10c3 PRR2 if PRR2!=0
mat corrmat_tA10C3 = r(C)
scalar corrsca_tA10C3= corrmat_tA10C3[1,2]
scalar pseudoR2_tA10C3= corrsca_tA10C3^2
display as text "Pseudo R2=" as result pseudoR2_tA10C3
*** TA10 Column(4)
pantob ER2 Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA10c4= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA10c4 = L.ER_carry2 + DER_hat_tA10c4
corr ER_hat_tA10c4 ER2 if ER2!=0
mat corrmat_tA10c4 = r(C)
scalar corrsca_tA10c4= corrmat_tA10c4[1,2]
scalar pseudoR2_tA10c4= corrsca_tA10c4^2
display as text "Pseudo R2=" as result pseudoR2_tA10c4
*** TA10 Column(5)
pantob PRR2 Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA10c5= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA10c5 = L.PRR_carry2 + DPRR_hat_tA10c5
corr PRR_hat_tA10c5 PRR2 if PRR2!=0
mat corrmat_tA10C5 = r(C)
scalar corrsca_tA10C5= corrmat_tA10C5[1,2]
scalar pseudoR2_tA10C5= corrsca_tA10C5^2
display as text "Pseudo R2=" as result pseudoR2_tA10C5
*** TA10 Column(6)
pantob PRR2 Lunemp Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA10c6= _b[Lunemp]*DLunemp +  _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA10c6 = L.PRR_carry2 + DPRR_hat_tA10c6
corr PRR_hat_tA10c6 PRR2 if PRR2!=0
mat corrmat_tA10C6 = r(C)
scalar corrsca_tA10C6= corrmat_tA10C6[1,2]
scalar pseudoR2_tA10C6= corrsca_tA10C6^2
display as text "Pseudo R2=" as result pseudoR2_tA10C6
*** TA10 Column(7)
pantob ER2 Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA10c7= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA10c7 = L.ER_carry2 + DER_hat_tA10c7
corr ER_hat_tA10c7 ER2 if ER2!=0
mat corrmat_tA10C7 = r(C)
scalar corrsca_tA10C7= corrmat_tA10C7[1,2]
scalar pseudoR2_tA10C7= corrsca_tA10C7^2
display as text "Pseudo R2=" as result pseudoR2_tA10C7
*** TA10 Column(8)
pantob ER2 Lunemp Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA10c8= _b[Lunemp]*DLunemp + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA10c8 = L.ER_carry2 + DER_hat_tA10c8
corr ER_hat_tA10c8 ER2 if ER2!=0
mat corrmat_tA10C8 = r(C)
scalar corrsca_tA10C8= corrmat_tA10C8[1,2]
scalar pseudoR2_tA10C8= corrsca_tA10C8^2
display as text "Pseudo R2=" as result pseudoR2_tA10C8


************************
****** Table A11 *******
************************
*** TA11 Column(1)
pantob PRR2 Lgini_disp_inc Lunemp Ldiff_immigration D_par nuts_2 
gen DPRR_hat_tΑ11c1= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_tΑ11c1 = L.PRR_carry + DPRR_hat_tΑ11c1
corr PRR_hat_tΑ11c1 PRR2 if PRR2!=0
mat corrmat_tΑ11c1 = r(C)
scalar corrsca_tΑ11c1= corrmat_tΑ11c1[1,2]
scalar pseudoR2_tΑ11c1= corrsca_tΑ11c1^2
display as text "Pseudo R2=" as result  pseudoR2_tΑ11c1
*** TA11 Column(2)
pantob ER2 Lgini_disp_inc Lunemp Ldiff_immigration D_par nuts_2
gen DER_hat_tΑ11c2= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_tΑ11c2 = L.ER_carry + DER_hat_tΑ11c2
corr ER_hat_tΑ11c2 ER2 if ER2!=0
mat corrmat_tΑ11c2 = r(C)
scalar corrsca_tΑ11c2= corrmat_tΑ11c2[1,2]
scalar pseudoR2_tΑ11c2= corrsca_tΑ11c2^2
display as text "Pseudo R2=" as result  pseudoR2_tΑ11c2
*** TA11 Column(3)
pantob PRR2 Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tΑ11c3= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_tΑ11c3 = L.PRR_carry + DPRR_hat_tΑ11c3
corr PRR_hat_tΑ11c3 PRR2 if PRR2!=0
mat corrmat_tΑ11c3 = r(C)
scalar corrsca_tΑ11c3= corrmat_tΑ11c3[1,2]
scalar pseudoR2_tΑ11c3= corrsca_tΑ11c3^2
display as text "Pseudo R2=" as result  pseudoR2_tΑ11c3
*** TA11 Column(4)
pantob ER2 Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tΑ11c4= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_tΑ11c4 = L.ER_carry + DER_hat_tΑ11c4
corr ER_hat_tΑ11c4 ER2 if ER2!=0
mat corrmat_tΑ11c4 = r(C)
scalar corrsca_tΑ11c4= corrmat_tΑ11c4[1,2]
scalar pseudoR2_tΑ11c4= corrsca_tΑ11c4^2
display as text "Pseudo R2=" as result  pseudoR2_tΑ11c4



*************************************
******     Tables A12-A14     *******
*************************************
*gen interactions and differences in interactions for calculations of fitted values
gen Lunemp_par=Lunemp*D_par
gen Limmigr_par=Ldiff_immigration*D_par
gen Lunemp_diffimm_par=Lunemp_diffimmigration*D_par
gen Lgdp_par=Lgdp_pps_hab*D_par
gen Ltax_par=Ltax*D_par
gen Lgini_par=Lgini*D_par
gen Lwage_sh_par=Lwage_sh*D_par
gen Lgrowth_par=LD_gdp_growth*D_par
gen Ldiffimm_par=Ldiff_immigration*D_par
gen Lineq_par=Lgini_disp_inc*D_par
gen Lineq_par_east=Lgini_disp_east*D_par
gen DLunemp_par= D.Lunemp_par
gen DLimmigr_par= D.Limmigr_par
gen DLunemp_diffimm_par= D.Lunemp_diffimm_par
gen DLgdp_par= D.Lgdp_par
gen DLtax_par= D.Ltax_par
gen DLgini_par= D.Lgini_par
gen DLwage_sh_par=D.Lwage_sh_par
gen DLgrowth_par= D.Lgrowth_par
gen DLdiffimm_par= D.Ldiffimm_par
gen DLineq_par= D.Lineq_par
gen DLineq_par_east= D.Lineq_par_east
************************
****** Table A12 *******
************************
**** TA12 Column 1
pantob PRR Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth Lunemp_par  Lgdp_par Ltax_par Lgini_par Lwage_sh_par Lgrowth_par D_par  nuts_2
gen DPRR_hat_tA12c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[Lunemp_par]*DLunemp_par + _b[Lgdp_par]*DLgdp_par + _b[Ltax_par]*DLtax_par + _b[Lgini_par]*DLgini_par + _b[Lwage_sh_par]*DLwage_sh_par + _b[Lgrowth_par]*DLgrowth_par + _b[D_par]*DD_par 
gen PRR_hat_tA12c1 = L.PRR_carry + DPRR_hat_tA12c1
corr PRR_hat_tA12c1 PRR if PRR!=0
mat corrmat_tA12C1 = r(C)
scalar corrsca_tA12C1= corrmat_tA12C1[1,2]
scalar pseudoR2_tA12C1= corrsca_tA12C1^2
display as text "Pseudo R2=" as result pseudoR2_tA12C1 
**** TA12 Column 2
pantob ER Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth Lunemp_par  Lgdp_par Ltax_par Lgini_par Lwage_sh_par Lgrowth_par D_par  nuts_2 // ommit immigration*unemployment due to collinearity >.80
gen DER_hat_tA12c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[Lunemp_par]*DLunemp_par + _b[Lgdp_par]*DLgdp_par + _b[Ltax_par]*DLtax_par + _b[Lgini_par]*DLgini_par + _b[Lwage_sh_par]*DLwage_sh_par + _b[Lgrowth_par]*DLgrowth_par + _b[D_par]*DD_par 
gen ER_hat_tA12c2 = L.PRR_carry + DER_hat_tA12c2
corr ER_hat_tA12c2 PRR if PRR!=0
mat corrmat_tA12C2 = r(C)
scalar corrsca_tA12C2= corrmat_tA12C2[1,2]
scalar pseudoR2_tA12C2= corrsca_tA12C2^2
display as text "Pseudo R2=" as result pseudoR2_tA12C2


************************
****** Table A13 *******
************************
**** TA13 Column (1)
pantob PRR Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth Lunemp_par Ldiffimm_par Lunemp_diffimm_par Lgdp_par Ltax_par Lgini_par Lwage_sh_par Lgrowth_par  D_par  nuts_2
gen DPRR_hat_tA13c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[Lunemp_par]*DLunemp_par + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_par]*DLgdp_par + _b[Ltax_par]*DLtax_par + _b[Lgini_par]*DLgini_par + _b[Lwage_sh_par]*DLwage_sh_par + _b[Lgrowth_par]*DLgrowth_par + _b[D_par]*DD_par 
gen PRR_hat_tA13c1 = L.PRR_carry + DPRR_hat_tA13c1
corr PRR_hat_tA13c1 PRR if PRR!=0
mat corrmat_tA13C1 = r(C)
scalar corrsca_tA13C1= corrmat_tA13C1[1,2]
scalar pseudoR2_tA13C1= corrsca_tA13C1^2
display as text "Pseudo R2=" as result pseudoR2_tA13C1
**** TA13 Column (2)
pantob ER Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth Lunemp_par Ldiffimm_par Lunemp_diffimm_par Lgdp_par Ltax_par Lgini_par Lwage_sh_par Lgrowth_par  D_par  nuts_2
gen DER_hat_tA13c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[Lunemp_par]*DLunemp_par + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_par]*DLgdp_par + _b[Ltax_par]*DLtax_par + _b[Lgini_par]*DLgini_par + _b[Lwage_sh_par]*DLwage_sh_par + _b[Lgrowth_par]*DLgrowth_par + _b[D_par]*DD_par 
gen ER_hat_tA13c2 = L.ER_carry + DER_hat_tA13c2
corr ER_hat_tA13c2 ER if ER!=0
mat corrmat_tA13C2 = r(C)
scalar corrsca_tA13C2= corrmat_tA13C2[1,2]
scalar pseudoR2_tA13C2= corrsca_tA13C2^2
display as text "Pseudo R2=" as result pseudoR2_tA13C2
 
 
************************
****** Table A14 *******
************************
**** TA14 Column (1)
pantob PRR Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth Lineq_par Lunemp_par Limmigr_par Lgdp_par Ltax_par Lgini_par Lwage_sh_par Lgrowth_par D_par nuts_2
gen DPRR_hat_tA14c1= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[Lineq_par]*DLineq_par + _b[Lunemp_par]*DLunemp_par + _b[Ldiff_immigration]*DLdiff_immigration  + _b[Lgdp_par]*DLgdp_par + _b[Ltax_par]*DLtax_par + _b[Lgini_par]*DLgini_par + _b[Lwage_sh_par]*DLwage_sh_par + _b[Lgrowth_par]*DLgrowth_par + _b[D_par]*DD_par 
gen PRR_hat_tA14c1 = L.PRR_carry + DPRR_hat_tA14c1
corr PRR_hat_tA14c1 PRR if PRR!=0
mat corrmat_tA14c1 = r(C)
scalar corrsca_tA14c1= corrmat_tA14c1[1,2]
scalar pseudoR2_tA14c1= corrsca_tA14c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA14c1
**** TA14 Column (2)
pantob ER Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth Lineq_par Lunemp_par Limmigr_par Lgdp_par Ltax_par Lgini_par Lwage_sh_par Lgrowth_par D_par nuts_2
gen DER_hat_tA14c2= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[Lineq_par]*DLineq_par + _b[Lunemp_par]*DLunemp_par + _b[Ldiff_immigration]*DLdiff_immigration  + _b[Lgdp_par]*DLgdp_par + _b[Ltax_par]*DLtax_par + _b[Lgini_par]*DLgini_par + _b[Lwage_sh_par]*DLwage_sh_par + _b[Lgrowth_par]*DLgrowth_par + _b[D_par]*DD_par 
gen ER_hat_tA14c2 = L.ER_carry + DER_hat_tA14c2
corr ER_hat_tA14c2 ER if ER!=0
mat corrmat_tA14c2 = r(C)
scalar corrsca_tA14c2= corrmat_tA14c2[1,2]
scalar pseudoR2_tA14c2= corrsca_tA14c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA14c2


************************
****** Table A15 *******
************************
****. TA15 Column (1)
pantob PRR Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lunemp_east Limmigr_east Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2
gen DPRR_hat_tA15c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lunemp_east]*DLunemp_east + _b[Limmigr_east]*DLimmigr_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east 
gen PRR_hat_tA15c1 = L.PRR_carry + DPRR_hat_tA15c1
corr PRR_hat_tA15c1 PRR if PRR!=0
mat corrmat_tA15C1 = r(C)
scalar corrsca_tA15C1= corrmat_tA15C1[1,2]
scalar pseudoR2_tA15C1= corrsca_tA15C1^2
display as text "Pseudo R2=" as result pseudoR2_tA15C1
****. TA15 Column (2)
pantob ER Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lunemp_east Limmigr_east Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2
gen DER_hat_tA15c2=  _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lunemp_east]*DLunemp_east + _b[Limmigr_east]*DLimmigr_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east 
gen ER_hat_tA15c2 = L.PRR_carry + DER_hat_tA15c2
corr ER_hat_tA15c2 PRR if PRR!=0
mat corrmat_tA15C2 = r(C)
scalar corrsca_tA15C2= corrmat_tA15C2[1,2]
scalar pseudoR2_tA15C2= corrsca_tA15C2^2
display as text "Pseudo R2=" as result pseudoR2_tA15C2

 
************************
****** Table A16 *******
************************
****. TA16 Column (1)
pantob PRR Lunemp Ldiff_immigration  Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lunemp_east Ldiffimm_east  Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2 
gen DPRR_hat_tA16c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lunemp_east]*DLunemp_east + _b[Ldiffimm_east]*DLdiffimm_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east 
gen PRR_hat_tA16c1 = L.PRR_carry + DPRR_hat_tA16c1
corr PRR_hat_tA16c1 PRR if PRR!=0
mat corrmat_tA16C1 = r(C)
scalar corrsca_tA16C1= corrmat_tA16C1[1,2]
scalar pseudoR2_tA16C1= corrsca_tA16C1^2
display as text "Pseudo R2=" as result pseudoR2_tA16C1
****. TA16 Column (2)
pantob ER Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lunemp_east Ldiffimm_east Lunemp_diffimm_east Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2 
gen DER_hat_tA16c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lunemp_east]*DLunemp_east + _b[Ldiffimm_east]*DLdiffimm_east + _b[Lunemp_diffimm_east]*DLunemp_diffimm_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east 
gen ER_hat_tA16c2 = L.ER_carry + DER_hat_tA16c2
corr ER_hat_tA16c2 ER if ER!=0
mat corrmat_tA16C2 = r(C)
scalar corrsca_tA16C2= corrmat_tA16C2[1,2]
scalar pseudoR2_tA16C2= corrsca_tA16C2^2
display as text "Pseudo R2=" as result pseudoR2_tA16C2


************************
****** Table A17 *******
************************
****. TA17 Column (1)
pantob PRR Lgini_disp_inc Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lineq_east Lunemp_east Ldiffimm_east  Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2
gen DPRR_hat_tA17c1= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lineq_east]*DLineq_east + _b[Lunemp_east]*DLunemp_east + _b[Ldiffimm_east]*DLdiffimm_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east 
gen PRR_hat_tA17c1 = L.PRR_carry + DPRR_hat_tA17c1
corr PRR_hat_tA17c1 PRR if PRR!=0
mat corrmat_tA17C1 = r(C)
scalar corrsca_tA17C1= corrmat_tA17C1[1,2]
scalar pseudoR2_tA17C1= corrsca_tA17C1^2
display as text "Pseudo R2=" as result pseudoR2_tA17C1
****. TA17 Column (2)
pantob ER Lgini_disp_inc Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lineq_east Lunemp_east Ldiffimm_east  Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2
gen DER_hat_tA17c2= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lineq_east]*DLineq_east + _b[Lunemp_east]*DLunemp_east + _b[Ldiffimm_east]*DLdiffimm_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east 
gen ER_hat_tA17c2 = L.ER_carry + DER_hat_tA17c2
corr ER_hat_tA17c2 ER if ER!=0
mat corrmat_tA17C2 = r(C)
scalar corrsca_tA17C2= corrmat_tA17C2[1,2]
scalar pseudoR2_tA17C2= corrsca_tA17C2^2
display as text "Pseudo R2=" as result pseudoR2_tA17C2


************************
****** Table A18 *******
************************
**** Columns 1 and 2 are calculated in table 2, cs 1,2
**** Table A18 column (3)
pantob PRR Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 if D_east==0
gen DPRR_hat_tA18c3= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA18c3 = L.PRR_carry + DPRR_hat_tA18c3
corr PRR_hat_tA18c3 PRR if PRR!=0
mat corrmat_tA18c3 = r(C)
scalar corrsca_tA18c3= corrmat_tA18c3[1,2]
scalar pseudoR2_tA18c3= corrsca_tA18c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA18c3
**** Table A18 column (4)
pantob ER Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2  if D_east==0
gen DER_hat_tA18c4= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA18c4 = L.ER_carry + DER_hat_tA18c4
corr ER_hat_tA18c4 ER if ER!=0
mat corrmat_tA18c4 = r(C)
scalar corrsca_tA18c4= corrmat_tA18c4[1,2]
scalar pseudoR2_tA18c4= corrsca_tA18c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA18c4
**** Table A18 column (5)
pantob PRR Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 if D_east==1
gen DPRR_hat_tA18c5= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA18c5 = L.PRR_carry + DPRR_hat_tA18c5
corr PRR_hat_tA18c5 PRR if PRR!=0
mat corrmat_tA18c5 = r(C)
scalar corrsca_tA18c5= corrmat_tA18c5[1,2]
scalar pseudoR2_tA18c5= corrsca_tA18c5^2
display as text "Pseudo R2=" as result  pseudoR2_tA18c5
**** Table A18 column (6)
pantob ER Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2  if D_east==1
gen DER_hat_tA18c6= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA18c6 = L.ER_carry + DER_hat_tA18c6
corr ER_hat_tA18c6 ER if ER!=0
mat corrmat_tA18c6 = r(C)
scalar corrsca_tA18c6= corrmat_tA18c6[1,2]
scalar pseudoR2_tA18c6= corrsca_tA18c6^2
display as text "Pseudo R2=" as result  pseudoR2_tA18c6



************************
****** Table A20 *******
************************
***** tA20, Column (1)
pantob PRR Lunemp Ldiff_immigration   D_par  nuts_2 
gen DPRR_hat_tA20c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_tA20c1 = L.PRR_carry + DPRR_hat_tA20c1
corr PRR_hat_tA20c1 PRR if PRR!=0
mat corrmat_tA20C1 = r(C)
scalar corrsca_tA20C1= corrmat_tA20C1[1,2]
scalar pseudoR2_tA20C1= corrsca_tA20C1^2
display as text "Pseudo R2=" as result pseudoR2_tA20C1
***** tA20, Column (2)
pantob ER Lunemp Ldiff_immigration D_par  nuts_2 
gen DER_hat_tA20c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_tA20c2 = L.ER_carry + DER_hat_tA20c2
corr ER_hat_tA20c2 ER if ER!=0
***** tA20, Column (3)
pantob PRR Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DPRR_hat_tA20c3= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen PRR_hat_tA20c3 = L.PRR_carry + DPRR_hat_tA20c3
corr PRR_hat_tA20c3 PRR if PRR!=0
mat corrmat_tA20_c3 = r(C)
scalar corrsca_tA20_c3= corrmat_tA20_c3[1,2]
scalar pseudoR2_tA20_c3= corrsca_tA20_c3^2
display as text "Pseudo R2=" as result pseudoR2_tA20_c3
***** tA20, Column (4)
pantob ER Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DER_hat_tA20c4= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen ER_hat_tA20c4 = L.ER_carry + DER_hat_tA20c4
corr ER_hat_tA20c4 ER if ER!=0
mat corrmat_tA20_c4 = r(C)
scalar corrsca_tA20_c4= corrmat_tA20_c4[1,2]
scalar pseudoR2_tA20_c4= corrsca_tA20_c4^2
display as text "Pseudo R2=" as result pseudoR2_tA20_c4




************************
****** Table A21 *******
************************
***** TA21, Column (1)
pantob PRR Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth D_par  nuts_2 
gen DPRR_hat_tA21c1= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen PRR_hat_tA21c1 = L.PRR_carry + DPRR_hat_tA21c1
corr PRR_hat_tA21c1 PRR if PRR!=0
mat corrmat_tA21_c1 = r(C)
scalar corrsca_tA21_c1= corrmat_tA21_c1[1,2]
scalar pseudoR2_tA21_c1= corrsca_tA21_c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA21_c1
***** TA21, Column (2)
pantob ER Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DER_hat_tA21c2= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen ER_hat_tA21c2 = L.ER_carry + DER_hat_tA21c2
corr ER_hat_tA21c2 ER if ER!=0
mat corrmat_tA21_c2 = r(C)
scalar corrsca_tA21_c2= corrmat_tA21_c2[1,2]
scalar pseudoR2_tA21_c2= corrsca_tA21_c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA21_c2
***** TA21, Column (3)
pantob PRR Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DPRR_hat_tA21c3= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen PRR_hat_tA21c3 = L.PRR_carry + DPRR_hat_tA21c3
corr PRR_hat_tA21c3 PRR if PRR!=0
mat corrmat_tA21_c3 = r(C)
scalar corrsca_tA21_c3= corrmat_tA21_c3[1,2]
scalar pseudoR2_tA21_c3= corrsca_tA21_c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA21_c3
***** TA21, Column (4)
pantob ER Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DER_hat_tA21c4= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen ER_hat_tA21c4 = L.ER_carry + DER_hat_tA21c4
corr ER_hat_tA21c4 ER if ER!=0
mat corrmat_tA21_c4 = r(C)
scalar corrsca_tA21_c4= corrmat_tA21_c4[1,2]
scalar pseudoR2_tA21_c4= corrsca_tA21_c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA21_c4


************************
****** Table A22 *******
************************
***** TA22, Column (1)
pantob PRR Lgini_disp_inc Lunemp Ldiff_immigration D_par nuts_2 
gen DPRR_hat_tA22c1= _b[Lgini_disp_inc]*DLgini_disp_inc  +  _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_tA22c1 = L.PRR_carry + DPRR_hat_tA22c1
corr PRR_hat_tA22c1 PRR if PRR!=0
mat corrmat_tA22c1 = r(C)
scalar corrsca_tA22c1= corrmat_tA22c1[1,2]
scalar pseudoR2_tA22c1= corrsca_tA22c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA22c1
***** TA22, Column (2)
pantob ER Lgini_disp_inc Lunemp Ldiff_immigration D_par nuts_2 
gen DER_hat_tA22c2= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_tA22c2 = L.ER_carry + DER_hat_tA22c2
corr ER_hat_tA22c2 ER if ER!=0
mat corrmat_tA22c2 = r(C)
scalar corrsca_tA22c2= corrmat_tA22c2[1,2]
scalar pseudoR2_tA22c2= corrsca_tA22c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA22c2
***** TA22, Column (3)
pantob PRR Lgini_disp_inc Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DPRR_hat_tA22c3= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen PRR_hat_tA22c3 = L.PRR_carry + DPRR_hat_tA22c3
corr PRR_hat_tA22c3 PRR if PRR!=0
mat corrmat_tA22c3 = r(C)
scalar corrsca_tA22c3= corrmat_tA22c3[1,2]
scalar pseudoR2_tA22c3= corrsca_tA22c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA22c3
***** TA22, Column (4)
pantob ER Lgini_disp_inc  Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh Lgrowth    D_par  nuts_2 
gen DER_hat_tA22c4= _b[Lgini_disp_inc]*DLgini_disp_inc + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[Lgrowth]*DLgrowth + _b[D_par]*DD_par
gen ER_hat_tA22c4 = L.ER_carry + DER_hat_tA22c4
corr ER_hat_tA22c4 ER if ER!=0
mat corrmat_tA22c4 = r(C)
scalar corrsca_tA22c4= corrmat_tA22c4[1,2]
scalar pseudoR2_tA22c4= corrsca_tA22c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA22c4


************************
****** Table A24 *******
************************
*********   inequality imputation
carryforward Lgini_disp_inc, gen(Lgini_disp_carry)
gen Lgini_east_carry= D_east*Lgini_disp_carry
gen DLgini_disp_carry= D.Lgini_disp_carry
gen DLgini_east_carry= D.Lgini_east_carry
**** Table A24
***** TA24, Column (1)
pantob PRR Lgini_disp_carry Lunemp Ldiff_immigration D_par  nuts_2 
gen DPRR_hat_tA24c1= _b[Lgini_disp_carry]*DLgini_disp_carry + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen PRR_hat_tA24c1 = L.PRR_carry + DPRR_hat_tA24c1
corr PRR_hat_tA24c1 PRR if PRR!=0
mat corrmat_tA24c1 = r(C)
scalar corrsca_tA24c1= corrmat_tA24c1[1,2]
scalar pseudoR2_tA24c1= corrsca_tA24c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA24c1
***** TA24, Column (2)
pantob ER Lgini_disp_carry Lunemp Ldiff_immigration D_par  nuts_2 
gen DER_hat_tA24c1= _b[Lgini_disp_carry]*DLgini_disp_carry + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[D_par]*DD_par
gen ER_hat_tA24c1 = L.ER_carry + DER_hat_tA24c1
corr ER_hat_tA24c1 ER if ER!=0
mat corrmat_tA24c1 = r(C)
scalar corrsca_tA24c1= corrmat_tA24c1[1,2]
scalar pseudoR2_tA24c1= corrsca_tA24c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA24c1
***** TA24, Column (3)
pantob PRR Lgini_disp_carry Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA24c3= _b[Lgini_disp_carry]*DLgini_disp_carry + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen PRR_hat_tA24c3 = L.PRR_carry + DPRR_hat_tA24c3
corr PRR_hat_tA24c3 PRR if PRR!=0
mat corrmat_tA24c3 = r(C)
scalar corrsca_tA24c3= corrmat_tA24c3[1,2]
scalar pseudoR2_tA24c3= corrsca_tA24c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA24c3
***** TA24, Column (4)
pantob ER Lgini_disp_carry Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA24c4= _b[Lgini_disp_carry]*DLgini_disp_carry + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par
gen ER_hat_tA24c4 = L.ER_carry + DER_hat_tA24c4
corr ER_hat_tA24c4 ER if ER!=0
mat corrmat_tA24c4 = r(C)
scalar corrsca_tA24c4= corrmat_tA24c4[1,2]
scalar pseudoR2_tA24c4= corrsca_tA24c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA24c4




************************
****** Table A25 *******
************************
***** TA25, Column (1)
pantob PRR Lgini_disp_carry Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lgini_east_carry  Lunemp_east Limmigr_east Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2 
gen DPRR_hat_tA25c1= _b[Lgini_disp_carry]*DLgini_disp_carry + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lgini_east_carry]*DLgini_east_carry + _b[Lunemp_east]*DLunemp_east + _b[Limmigr_east]*DLimmigr_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east
gen PRR_hat_tA25c1 = L.PRR_carry + DPRR_hat_tA25c1
corr PRR_hat_tA25c1 PRR if PRR!=0
mat corrmat_tA25c1 = r(C)
scalar corrsca_tA25c1= corrmat_tA25c1[1,2]
scalar pseudoR2_tA25c1= corrsca_tA25c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA25c1
***** TA25, Column (2)
pantob ER Lgini_disp_carry Lunemp Ldiff_immigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth D_par Lgini_east_carry  Lunemp_east Limmigr_east Lgdp_east Ltax_east Lgini_east Lwage_sh_east Lgrowth_east Dpar_east nuts_2 
gen DER_hat_tA25c2= _b[Lgini_disp_carry]*DLgini_disp_carry + _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par + _b[Lgini_east_carry]*DLgini_east_carry + _b[Lunemp_east]*DLunemp_east + _b[Limmigr_east]*DLimmigr_east + _b[Lgdp_east]*DLgdp_east + _b[Ltax_east]*DLtax_east + _b[Lgini_east]*DLgini_east + _b[Lwage_sh_east]*DLwage_sh_east + _b[Lgrowth_east]*DLgrowth_east + _b[Dpar_east]*DDpar_east
gen ER_hat_tA25c2 = L.ER_carry + DER_hat_tA25c2
corr ER_hat_tA25c2 ER if ER!=0
mat corrmat_tA25c2 = r(C)
scalar corrsca_tA25c2= corrmat_tA25c2[1,2]
scalar pseudoR2_tA25c2= corrsca_tA25c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA25c2


************************
****** Table A26 *******
************************
***** TA25, Column (1)
xttobit PRR Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par, ll(0) 
predict PRR_hat_tA26c1, xb
corr PRR_hat_tA26c1 PRR if PRR!=0
mat corrmat_tA26c1 = r(C)
scalar corrsca_tA26c1= corrmat_tA26c1[1,2]
scalar pseudoR2_tA26c1= corrsca_tA26c1^2
display as text "Pseudo R2=" as result pseudoR2_tA26c1
***** TA25, Column (2)
xttobit PRR Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par ib9.country, ll(0)
predict ER_fittedxt2, xb
corr ER_fittedxt2 PRR if PRR>0
mat corrmat_tA26c2 = r(C)
scalar corrsca_tA26c2= corrmat_tA26c2[1,2]
scalar pseudoR2_tA26c2= corrsca_tA26c2^2
display as text "Pseudo R2=" as result pseudoR2_tA26c2
***** TA25, Column (3)
xttobit ER Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par, ll(0) 
predict ER_hat_tA26c3, xb
corr ER_hat_tA26c3 ER if ER!=0
mat corrmat_tA26c3 = r(C)
scalar corrsca_tA26c3= corrmat_tA26c3[1,2]
scalar pseudoR2_tA26c3= corrsca_tA26c3^2
display as text "Pseudo R2=" as result pseudoR2_tA26c3
***** TA25, Column (4)
xttobit ER Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par ib9.country, ll(0)
predict PRR_hat_tA26c4, xb
corr PRR_hat_tA26c4 PRR if PRR!=0
mat corrmat_tA26c4 = r(C)
scalar corrsca_tA26c4= corrmat_tA26c4[1,2]
scalar pseudoR2_tA26c4= corrsca_tA26c4^2
display as text "Pseudo R2=" as result pseudoR2_tA26c4



************************
****** Table A28 *******
************************
*****. TA28, Column (1)
pantob PRR Lunemp Ldiff_immigration Leduc_tert Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA28c1=  _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration +_b[Leduc_tert]*DLeduc_tert + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen PRR_hat_tA28c1 = L.PRR_carry + DPRR_hat_tA28c1
corr PRR_hat_tA28c1 PRR if PRR!=0
mat corrmat_tA28c1 = r(C)
scalar corrsca_tA28c1= corrmat_tA28c1[1,2]
scalar pseudoR2_tA28c1= corrsca_tA28c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA28c1
*****. TA28, Column (2)
pantob ER Lunemp Ldiff_immigration Leduc_tert Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA28c2=  _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration +_b[Leduc_tert]*DLeduc_tert + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen ER_hat_tA28c2 = L.ER_carry + DER_hat_tA28c2
corr ER_hat_tA28c2 ER if ER!=0
mat corrmat_tA28c2 = r(C)
scalar corrsca_tA28c2= corrmat_tA28c2[1,2]
scalar pseudoR2_tA28c2= corrsca_tA28c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA28c2
*****. TA28, Column (3)
pantob PRR Lunemp Ldiff_immigration Leduc_lsec Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA28c3=  _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration +_b[Leduc_lsec]*DLeduc_lsec + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen PRR_hat_tA28c3 = L.PRR_carry + DPRR_hat_tA28c3
corr PRR_hat_tA28c3 PRR if PRR!=0
mat corrmat_tA28c3 = r(C)
scalar corrsca_tA28c3= corrmat_tA28c3[1,2]
scalar pseudoR2_tA28c3= corrsca_tA28c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA28c3
*****. TA28, Column (4)
pantob ER Lunemp Ldiff_immigration Leduc_lsec Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DER_hat_tA28c4=  _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration +_b[Leduc_lsec]*DLeduc_lsec + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen ER_hat_tA28c4 = L.ER_carry + DER_hat_tA28c4
corr ER_hat_tA28c4 ER if ER!=0
mat corrmat_tA28c4 = r(C)
scalar corrsca_tA28c4= corrmat_tA28c4[1,2]
scalar pseudoR2_tA28c4= corrsca_tA28c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA28c4


************************
****** Table A29 *******
************************
*****. TA29, Column (1)
pantob PRR Lunemp Lgdp_pps_hab Lunemp_gdp Ldiff_immigration Ltax Lgini  Lwage_sh LD_gdp_growth    D_par  nuts_2 
gen DPRR_hat_tA29c1=  _b[Lunemp]*DLunemp + _b[Lgdp_pps_hab]*DLgdp_pps_hab +_b[Lunemp_gdp]*DLunemp_gdp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen PRR_hat_tA29c1 = L.PRR_carry + DPRR_hat_tA29c1
corr PRR_hat_tA29c1 PRR if PRR!=0
mat corrmat_tA29c1 = r(C)
scalar corrsca_tA29c1= corrmat_tA29c1[1,2]
scalar pseudoR2_tA29c1= corrsca_tA29c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA29c1
*****. TA29, Column (2)
pantob ER Lunemp Lgdp_pps_hab Lunemp_gdp Ldiff_immigration Ltax Lgini  Lwage_sh LD_gdp_growth D_par nuts_2 
gen DER_hat_tA29c2=  _b[Lunemp]*DLunemp + _b[Lgdp_pps_hab]*DLgdp_pps_hab +_b[Lunemp_gdp]*DLunemp_gdp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen ER_hat_tA29c2 = L.ER_carry + DER_hat_tA29c2
corr ER_hat_tA29c2 ER if ER!=0
mat corrmat_tA29c2 = r(C)
scalar corrsca_tA29c2= corrmat_tA29c2[1,2]
scalar pseudoR2_tA29c2= corrsca_tA29c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA29c2
*****. TA29, Column (3)
pantob PRR Lunemp Lgdp_quart2 Lgdp_quart3 Lgdp_quart4 Ldiff_immigration Ltax Lgini  Lwage_sh LD_gdp_growth D_par nuts_2 
gen DPRR_hat_tA29c3=  _b[Lunemp]*DLunemp + _b[Lgdp_quart2]*DLgdp_quart2 + _b[Lgdp_quart3]*DLgdp_quart3 + _b[Lgdp_quart4]*DLgdp_quart4 +  _b[Ldiff_immigration]*DLdiff_immigration + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen PRR_hat_tA29c3 = L.PRR_carry + DPRR_hat_tA29c3
corr PRR_hat_tA29c3 PRR if PRR!=0
mat corrmat_tA29c3 = r(C)
scalar corrsca_tA29c3= corrmat_tA29c3[1,2]
scalar pseudoR2_tA29c3= corrsca_tA29c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA29c3
*****. TA29, Column (4)
pantob ER Lunemp Lgdp_quart2 Lgdp_quart3 Lgdp_quart4 Ldiff_immigration Ltax Lgini  Lwage_sh LD_gdp_growth D_par nuts_2 
gen DER_hat_tA29c4=  _b[Lunemp]*DLunemp + _b[Lgdp_quart2]*DLgdp_quart2 + _b[Lgdp_quart3]*DLgdp_quart3 + _b[Lgdp_quart4]*DLgdp_quart4 +  _b[Ldiff_immigration]*DLdiff_immigration + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth + _b[D_par]*DD_par 
gen ER_hat_tA29c4 = L.ER_carry + DER_hat_tA29c4
corr ER_hat_tA29c4 ER if ER!=0
mat corrmat_tA29c4 = r(C)
scalar corrsca_tA29c4= corrmat_tA29c4[1,2]
scalar pseudoR2_tA29c4= corrsca_tA29c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA29c4




************************
****** Table A30 *******
************************
*** TA30 Column (1)
pantob PRR Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DPRR_hat_tA30c1= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth 
gen PRR_hat_tA30c1 = L.PRR_carry + DPRR_hat_tA30c1
corr PRR_hat_tA30c1 PRR if PRR!=0
mat corrmat_tA30c1 = r(C)
scalar corrsca_tA30c1= corrmat_tA30c1[1,2]
scalar pseudoR2_tA30c1= corrsca_tA30c1^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c1
*** TA30 Column (2)
pantob ER Lunemp Ldiff_immigration   Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DER_hat_tA30c2= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth 
gen ER_hat_tA30c2 = L.ER_carry + DER_hat_tA30c2
corr ER_hat_tA30c2 ER if ER!=0
mat corrmat_tA30c2 = r(C)
scalar corrsca_tA30c2= corrmat_tA30c2[1,2]
scalar pseudoR2_tA30c2= corrsca_tA30c2^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c2
*** TA30 Column (3)
pantob PRR Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DPRR_hat_tA30c3= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth
gen PRR_hat_tA30c3 = L.PRR_carry + DPRR_hat_tA30c3
corr PRR_hat_tA30c3 PRR if PRR!=0
mat corrmat_tA30c3 = r(C)
scalar corrsca_tA30c3= corrmat_tA30c3[1,2]
scalar pseudoR2_tA30c3= corrsca_tA30c3^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c3
*** TA30 Column (4)
pantob ER Lunemp Limmigration_cr Lunemp_immigr_cr Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DER_hat_tA30c4= _b[Lunemp]*DLunemp + _b[Limmigration_cr]*DLimmigration_cr + _b[Lunemp_immigr_cr]*DLunemp_immigr_cr + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth 
gen ER_hat_tA30c4 = L.ER_carry + DER_hat_tA30c4
corr ER_hat_tA30c4 ER if ER!=0
mat corrmat_tA30c4 = r(C)
scalar corrsca_tA30c4= corrmat_tA30c4[1,2]
scalar pseudoR2_tA30c4= corrsca_tA30c4^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c4
*** TA30 Column (5)
pantob PRR Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DPRR_hat_tA30c5= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth 
gen PRR_hat_tA30c5 = L.PRR_carry + DPRR_hat_tA30c5
corr PRR_hat_tA30c5 PRR if PRR!=0
mat corrmat_tA30c5 = r(C)
scalar corrsca_tA30c5= corrmat_tA30c5[1,2]
scalar pseudoR2_tA30c5= corrsca_tA30c5^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c5
*** TA30 Column (6)
pantob PRR Lunemp Ldiff_immigration  Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DPRR_hat_tA30c6= _b[Lunemp]*DLunemp  + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth 
gen PRR_hat_tA30c6 = L.PRR_carry + DPRR_hat_tA30c6
corr PRR_hat_tA30c6 PRR if PRR!=0
mat corrmat_tA30c6= r(C)
scalar corrsca_tA30c6= corrmat_tA30c6[1,2]
scalar pseudoR2_tA30c6= corrsca_tA30c6^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c6
*** TA30 Column (7)
pantob ER Lunemp Ldiff_immigration Lunemp_diffimmigration Lgdp_pps_hab Ltax Lgini  Lwage_sh LD_gdp_growth    nuts_2 if country!= 26 & country!=18 & country!= 24 & D_par==1
gen DER_hat_tA30c7= _b[Lunemp]*DLunemp + _b[Ldiff_immigration]*DLdiff_immigration + _b[Lunemp_diffimmigration]*DLunemp_diffimmigration + _b[Lgdp_pps_hab]*DLgdp_pps_hab + _b[Ltax]*DLtax + _b[Lgini]*DLgini + _b[Lwage_sh]*DLwage_sh + _b[LD_gdp_growth]*DLD_gdp_growth 
gen ER_hat_tA30c7 = L.ER_carry + DER_hat_tA30c7
corr ER_hat_tA30c7 ER if ER!=0
mat corrmat_tA30c7 = r(C)
scalar corrsca_tA30c7= corrmat_tA30c7[1,2]
scalar pseudoR2_tA30c7= corrsca_tA30c7^2
display as text "Pseudo R2=" as result  pseudoR2_tA30c7
